import request from '@/utils/request'

export function addReservation(data) {
  return request({
    url: '/juanbusiness/reservation/add',
    method: 'post',
    data
  })
}

export function addCallback(data) {
  return request({
    url: '/juanbusiness/reservation/addCallback',
    method: 'post',
    data
  })
}

export function findReservation(page,size,reservationNo,reservationType,reservationStatus) {
  return request({
    url: '/juanbusiness/reservation/findPage',
    method: 'get',
    params: {page: page,size: size,reservationNo: reservationNo,reservationType: reservationType,reservationStatus: reservationStatus}
  })
}

export function findCallback(page,size,reservationId) {
  return request({
    url: '/juanbusiness/reservation/findPageCallback',
    method: 'get',
    params: {page: page,size: size,reservationId: reservationId}
  })
}

export function findComplaint(page,size,reservationId) {
  return request({
    url: '/juanbusiness/reservation/findPageComplaint',
    method: 'get',
    params: {page: page,size: size,reservationId: reservationId}
  })
}

  export function detailReservation(id) {
    return request({
      url: '/juanbusiness/reservation/get',
      method: 'get',
      params: {id: id}
    })
  }


export function editReservation(data) {
  return request({
    url: '/juanbusiness/reservation/edit',
    method: 'put',
    data
  })
}

export function editRemark(data) {
  return request({
    url: '/juanbusiness/reservation/editRemark',
    method: 'put',
    data
  })
}

export function delReservation(id) {
  return request({
    url: '/juanbusiness/reservation/del',
    method: 'delete',
    params: {id: id}
  })
}
